<!DOCTYPE html>
<html lang="en">
<head>
  <meta charset="UTF-8">
  <title>事件基本使用</title>
  <script src="../js/vue.js"></script>
</head>
<body>
<div class="app">
  <h2>事件处理</h2>
  <button v-on:click="show1(1, $event)">click me</button> <br>
  <button @click="show2($event, 'abc')">点击我!</button> <br>
</div>
</body>
<script>
  Vue.config.productionTip = false
  const vm = new Vue({
    el: '.app',
    data: {
      name: 'alice'
    },
    methods: {
      show1(value, event) {
        console.log('show1: ', value, event, event.target)
      },
      show2(event, value) {
        console.log('show2: ', value, event, event.target)
      }
    }
  })
  console.log(vm)
</script>
</html>